#ifndef PORT_H_
#define PORT_H_

/**
 * Manipulates the GPIO's on the microcontroller.
 * @date May 18, 2011
 * @code
 * pinToggle(PB5, &PORTB);
 * pinClear(PB0, &PORTA);
 * pinSet(PB7, &PORTC);
 * @endcode
 */
#include <avr/io.h>

/**
 * Toggles the value on the pins of the given port
 * @author David Asabina
 * @param pin the pin number to be manipulated
 * @param pointer to the port to which to apply the pin manipulation
 */
void pinToggle(uint8_t pin, uint8_t* port);

/**
 * Clears the value on the pins of the given port
 * @author David Asabina
 * @param pin the pin number to be manipulated
 * @param pointer to the port to which to apply the pin manipulation
 */
void pinClear(uint8_t pin, uint8_t* port);

/**
 * Sets the value on the pins of the given port
 * @author David Asabina
 * @param pin the pin number to be manipulated
 * @param pointer to the port to which to apply the pin manipulation
 */
void pinSet(uint8_t pin, uint8_t* port);

#endif
